package com.onetime.common.constants;

/**
 * @author Lenovo
 */
public class WareConstants {
    /**
     * 属性枚举
     */
    public enum PurchaseStatusEnumeration {
        /*状态[0新建，1已分配，2已领取，3已完成，4采购失败]*/
        CREATE(0, "新建"),
        ASSIGNED(1, "已分配"),
        RECEIVED(2, "已领取"),
        FINISHED(3, "已完成"),
        FAILURE(4, "采购失败");

        /**
         * 数据库中存在的枚举值
         */
        private final Integer code;
        private final String message;

        PurchaseStatusEnumeration(Integer code, String message) {
            this.code = code;
            this.message = message;
        }

        public int getCode() {
            return code;
        }

        public String getMessage() {
            return message;
        }
    }

    public enum PurchaseDetailsEnumeration {
        /*状态[0新建，1已分配，2正在采购，3已完成，4采购失败]*/
        CREATE(0, "新建"),
        ASSIGNED(1, "已分配"),
        PURCHASING(2, "正在采购"),
        FINISHED(3, "已完成"),
        FAILURE(4, "采购失败");

        /**
         * 数据库中存在的枚举值
         */
        private final Integer code;
        private final String message;

        PurchaseDetailsEnumeration(Integer code, String message) {
            this.code = code;
            this.message = message;
        }

        public int getCode() {
            return code;
        }

        public String getMessage() {
            return message;
        }
    }
}
